#!/usr/bin/python3
# -*- coding:utf-8 -*-
"""
捕获错误后在再次抛出
"""


def foo(s):
    n = int(s)
    if n == 0:
        raise ZeroDivisionError('invalid value: %s' % s)
    return 10 / n


def bar():
    try:
        foo('0')
    except ZeroDivisionError as e:
        print('ZeroDivisionError!', e)
        raise ValueError(str(e)+'==>input error!')


def main():
    try:
        bar()
    except ValueError as e:
        print('exception:', e)


if __name__ == "__main__":
    main()
